import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.Scanner;

public class ClientSend implements Runnable{
    private ObjectOutputStream oos;
    public ClientSend(ObjectOutputStream oos){
        this.oos=oos;
    }
    public void run() {
        while (true){
            try {
            Scanner sc = new Scanner(System.in);
            String msg= sc.nextLine();

                oos.writeObject(msg);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
